const express = require('express')
const app = express()
app.listen(8080)
app.use(express.urlencoded({
    extended:false
}))
// app.get('/',(req,res)=>{
//     res.redirect('http://127.0.0.1:5501/views/login.html')
// })

app.post('/v1/login',(req,res,next)=>{
    res.setHeader("Access-Control-Allow-Origin", '*');
    res.setHeader("Access-Control-Allow-Credentials", "true");
    console.log(req.body)
    if(req.body.password =='123'){
        res.send({
            "code":200,
            "msg":"成功"
        })
    }                                                                                 
})

